// 导入moment
import moment from 'moment';
// 导入中文语言包
import 'moment/locale/zh-cn';
// 设置中文
moment.locale('zh-cn');

const filterTime = (time) => {
    return moment(time).startOf('hour').fromNow();
}


const filterTimeLLL = (time) => {
    return moment(time).format('lll');
}
const filterTimeSSS = (time) => {
    return moment(time).calendar();
}

export { filterTime, filterTimeLLL, filterTimeSSS };